<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
        <link rel="stylesheet" href="css/bootstrap.min.css">
        <link rel="stylesheet" href="css/index.css">
        <link rel="stylesheet" href="css/registered.css">
        <script src="js/jquery-3.4.1.min.js"></script>
        <script src="js/bootstrap.min.js"></script>
        <script src="js/index.js"></script>
        <script src="js/regular.js"></script>
        <title>registered</title>
    </head>
    <body>
        <div class="content">
            <!-- 上面的navbar -->
            <div id="header"></div>

        <form method="POST" action="http://localhost:8686/registered">
            <div  class="main">
                <div class="con">
                    <li class="con1">
                        <a href="/index">主页</a>
                        <span>/</span>
                    </li>
                    <li class="con2">
                        注册
                    </li>
                </div>
                <div class="name">用户名</div>
                <div class="row">
                    <div class="col-lg-4">
                        <input type="text" class="form-control" placeholder="英文/英文+数字" id="user_name" name="user_name"> 
                    </div>
                    <font id="ft"></font>
                </div>
        
                <div class="pwd">密码</div>
                <div class="row">
                    <div class="col-lg-4">
                        <input type="password" class="form-control" id="user_pass" name="user_pass" placeholder="只能输入6-20个字母、数字、下划线 ">
                    </div>
                    <font id="ff"></font>
                </div>
                <div class="email">邮箱</div>
                <div class="row">
                    <div class="col-lg-4">
                        <input type="email" class="form-control" id="email" name="email" placeholder="只能输入6-20个字母、数字、下划线 ">
                    </div>
                    <font id="fe"></font>
                </div>
                <div>
                    <input type="submit" class="log" id="log" value="注册" >

                    <a href="/login" class="log2">已有账号？</a>
                </div>
            </div>
            <div id="state" aa={{state}}></div>
        </form>
    </body>
    <script>
        $("#header").load("http://localhost:8686/header");
        if($('#state').attr('aa')=="0"){
        alert('邮箱已存在！')
    }
    </script>
</html>